home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12357 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.2 KB  |  64 lines

  1. Path: news.ICSI.Net!news
  2. From: mrn623@icsi.net
  3. Newsgroups: comp.lang.c
  4. Subject: Help w/ C + EMX + OS/2
  5. Date: 31 Mar 1996 18:37:20 GMT
  6. Organization: Internet Connect Services, Inc.
  7. Message-ID: <4jmjd0$ai2@monet.ICSI.Net>
  8. Reply-To: mrn623@icsi.net
  9. NNTP-Posting-Host: 205.240.54.27
  10. X-Newsreader: IBM NewsReader/2 v1.9d - NLS
  11.  
  12. Hi everyone!
  13.  
  14. I'm writing a simple program to assit me with BattleTech, and I'm using EMX under
  15. OS/2...
  16.  
  17. I try to compile this code with:
  18.  
  19. gcc test.c -lvideo
  20. ************************
  21. #include <stdio.h>                          
  22. #include <sys/video.h>                      
  23.                                             
  24. int det_tech ( void );                      
  25. void prep_vid( void );                      
  26.                                             
  27. prep_vid()                                  
  28. {                                           
  29.    v_clear();                               
  30.    v_gotoxy( 0, 0 );                        
  31. }                                           
  32.                                             
  33. det_tech()                                  
  34. {                                           
  35.    int a;                                   
  36.    prep_vid();                              
  37.    printf( "Choose a technology base:\n" ); 
  38.    printf( "1) Inner Sphere\n" );           
  39.    printf( "2) Clan\n\n" );                 
  40.    printf( "Your selection - " );           
  41.    scanf( "%d", a );                        
  42.    prep_vid();                              
  43.    return a;                                
  44. }                                           
  45.                                             
  46. main()                                      
  47. {                                           
  48.    int tech_base = det_tech();              
  49.    v_init();                                
  50.    if ( tech_base = 1 ) {                   
  51.       printf( "Inner Sphere" );             
  52.    } else {                                 
  53.       printf( "Clan" );                     
  54.    } /* endif */                            
  55. }                                           
  56. **************************
  57.  
  58. and I get
  59. test.c:8: conflicting types for 'prep_vid'
  60. test.c:5: previous declaration of 'prep_vid'
  61.  
  62. What am I doing wrong???
  63.  
  64.